/*
 * @Description: 救援单维护
 * @Autor: 刘诗文
 * @Date: 2020-11-16 14:16:20
 * @LastEditors: 刘诗文
 * @LastEditTime: 2020-12-09 13:50:36
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 救援单查询
export const getRescueList = params => axios.post(`${SERVER.CLAIMDEALER}/rPOut/getListByPage`, params);

// 生成救援单号
export const getOutNo = params => axios.get(`${SERVER.CLAIMDEALER}/rPOut/getOutNo`, { params });

// 客户专员 - 下拉框
export const getUserListSelect = params => axios.get(`${SERVER.SYSMANAGE}/basedata/users/getUserListByRole?role=10071042`, { params });

// 救援单维护保存
export const saveOut = params => axios.post(`${SERVER.CLAIMDEALER}/rPOut/saveOut`, params);

//救援单导出
export const getOutExport = params => {
    return axios({
      url:`${SERVER.CLAIMDEALER}/rPOut/getOutExport`,
      method: 'post',
      params: params,
      responseType: 'blob'
    });
  };
// 查询经销商列表
export const getDearList = params => axios.get(`${CMSCLOUD_CHANNEL}/message/dealerAttach/dealerInfo/byAllInfo`, { params });

// 上报救援单
export const reportedOut = params => axios.post(`${SERVER.CLAIMDEALER}/rPOut/reportedOut`, params);